﻿<%@page import="java.util.ArrayList"%>
 <%@page import="com.entity.GoodsType"%>
<%@page import="com.util.PublicToolShowDetailTypeList"%>
<%@page import="com.util.PublicToolGetTypeDetailInfo"%>
<%@page import="com.dao.GoodsTypeDetailInfoDAO"%>
<%@page import="com.entity.GoodsType"%>
<%@page import="com.entity.GoodsTypeDetail"%>
<%@page import="com.util.PublicToolCheckParam"%>
<%@page import="com.entity.SalesGoods"%>
<%@page import="com.util.PublicToolShowGooodsTypeList"%>
<%@page import="com.entity.BulletinInfo"%>

<%@page import="com.entity.GoodsInfo"%>
<%@page import="com.util.PublicToolIndexProductShow"%>
<%@page import="com.entity.GoodsTypeDetail"%>
 <%@page import="com.util.PublicToolCheckParam"%>
<%@page import="com.entity.SalesGoods"%>
 <%@page import="com.entity.OrderInfo"%>
<%@page import="com.entity.CustomerDetailInfo"%>
<%@page import="com.entity.CustomerInfo"%>
<%@page import="com.dao.GoodsInfoDAO"%>
<%@page import="com.entity.GoodsInfo"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<%
	String email = (String) session.getAttribute("email");
	String thirdemail = (String) session.getAttribute("thirdemail");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<base href="<%=basePath%>">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=7">
	<title>填写信息</title>
	<meta content="" name="keywords">
	<meta content="" name="description">
	<link href="css/common.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="./js/base.js"></script>
	<script type="text/javascript" src="js/menu.js"></script>
	<script type="text/javascript" src="js/time.js"></script>
	<script type="text/javascript" src="js/lb.js"></script>

	<script type="text/javascript" src="js/web/sendInfo.js" charset="utf-8"></script>
	<script type="text/javascript">
        function checkLogin() {
            if ("<%=email%>" == "" || "<%=email%>" == "null") {
                alert("请先登陆!");
                return false;
            }
            else {
                top.location.href = "servlet/DoMethod?method=showMyInformation";
                return true;
            }
        }
        function checkUserLogin() {
            if ("<%=email%>" == "" || "<%=email%>" == "null") {
                alert("请先登陆!");
                return false;
            }
            else {
                top.location.href = "servlet/DoChatMethod?method=login";
                return true;
            }
        }
	</script>

	<!---reload-!-->
</head>
<body style="background:transparent url(images/bg.jpg) repeat scroll 0% 0%" onload="times()">
<div id="contain">
	<!-- 头 -->
	<jsp:include page="../web/top.jsp" flush="true"/>
	<!-- 头 -->
	<!-- 第二部分内容 -->
	<div class="box" style=" margin-top:1px;   background: url(images/pbg.gif);">
		<div class="left">
			<jsp:include page="../web/left.jsp" flush="true"/>
		</div>
		<div class="right">
			<div class="boxtitlebg mbnav"><a href="">首页</a> &gt; 我的信息</div>
			<!--内容-->
			<div style="padding:10px">
				<table style="font-size: 13px;margin-top: 20px" width='100%' align="center">
					<%
				 		ArrayList<OrderInfo> orderList= (ArrayList<OrderInfo>)request.getAttribute("orderList");
						CustomerDetailInfo customerDetailInfo =	(CustomerDetailInfo)request.getAttribute("customerDetailInfo");
						CustomerInfo  customerInfo = (CustomerInfo)request.getAttribute("customerInfo");
						out.println("<tr><td colspan='2'>");


						String error = (String)request.getAttribute("error");
						if(error != null){
							out.println("<font color='#FF0000' size='2'>"+error+"</font>");
						}

						out.print("<hr color='#FF6699' style='height:1px'/></td></tr>");
						out.println("<tr><td height='30' colspan='2'><font color='#0099FF' size='3'><strong>帐号信息：</strong></font></td></tr>");
						out.println("<tr><td height='30' style='padding-left:20px'><font color='#666666'><strong>帐号：</strong></font></td><td width='600' style='padding-left:20px'>"+customerInfo.getEmail()+"</td></tr>");
						out.println("<tr><td height='30' style='padding-left:20px'><font color='#666666'><strong>注册时间：</strong></font></td><td style='padding-left:20px'>"+customerInfo.getRegisterTime()+"</td></tr>");
						out.println("<tr><td colspan='2'><hr color='#FF6699' style='height:1px'/></td></tr>");


						out.println("    <form action='servlet/DoMethod?method=updatepwd' method='post' onsubmit='return checkupdate()'><tr><td colspan='2'></td></tr>");
						out.println("<input type='hidden' name='email' value='"+customerInfo.getEmail()+"'><tr><td height='30' colspan='2'><font color='#0099FF' size='3'><strong>修改密码：</strong></font></td></tr>");
						out.println("<tr><td height='30' style='padding-left:20px'><font color='#666666'><strong>密码：</strong></font></td><td width='600' style='padding-left:20px'><input id='regPwd' type='password' name='regPwd' style='width:200px;height:19px;padding-top: 3px'/></td></tr>");
						out.println("<tr><td height='30' style='padding-left:20px'><font color='#666666'><strong>确认密码：</strong></font></td><td style='padding-left:20px'><input id='regConPwd' type='password' name='regConPwd' style='width:200px;height:19px;padding-top: 3px'/></td></tr>");
						out.println("<tr><td colspan='2'  align='center'><input type='image' style='cursor: pointer;' src='images/button_save.jpg' align='middle'/><br><hr color='#FF6699' style='height:1px'/></td></tr></form>");


						out.println("<tr><td  height='30' colspan='2'><font color='#0099FF' size='3'><strong>联系信息：</strong></font></td></tr>");
						if(customerDetailInfo == null){
							out.println("<tr><td height='30' style='padding-left:20px'><font color='#666666'><strong>姓名：</strong></font></td><td style='padding-left:20px'>从未填写过</td></tr>");
							out.println("<tr><td height='30' style='padding-left:20px'><font color='#666666'><strong>固定电话：</strong></font></td><td style='padding-left:20px'>从未填写过</td></tr>");
							out.println("<tr><td height='30' style='padding-left:20px'><font color='#666666'><strong>送货地址：</strong></font></td><td style='padding-left:20px'>从未填写过</td></tr>");

						}
						else{
							out.println("<tr><td height='30' style='padding-left:20px'><font color='#666666'><strong>姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp名：</strong></font></td><td style='padding-left:20px'>"+customerDetailInfo.getName()+"</td></tr>");
							out.println("<tr><td height='30' style='padding-left:20px'><font color='#666666'><strong>移动电话：</strong></font></td><td style='padding-left:20px'>"+customerDetailInfo.getMovePhone()+"</td></tr>");
							out.println("<tr><td height='30' style='padding-left:20px'><font color='#666666'><strong>送货地址：</strong></font></td><td style='padding-left:20px'>"+customerDetailInfo.getAddress()+"</td></tr>");
						}
						out.println("<tr><td colspan='2'><hr color='#FF6699' style='height:1px'/></td></tr>");
						out.println("<tr><td height='30' colspan='2'><font color='#0099FF' size='3'><strong>就诊信息：</strong></font></td></tr>");
						out.println("<tr><td style='padding-left:20px' colspan='2'>");
						out.println("<table border='1' cellpadding='0' cellspacing='0' style='font-size:13px'  bordercolor='#cccccc'>");
						out.println("<tr height='30'>");
						out.println("<td width='170'><div align='center'><font color='#666666'>就诊编号</font></div></td>");
						out.println("<td width='170'><div align='center'><font color='#666666'>就诊状态</font></div></td>");
						out.println("<td width='170'><div align='center'><font color='#666666'>就诊时间</font></div></td>");
						out.println("<td width='170'><div align='center'><font color='#666666'>操作</font></div></td>");
						out.println("</tr>");
						if(orderList.size() == 0){
							out.println("<tr><td height='30' colspan='4'><div align='center'>暂无数据!</div></td></tr>");
						}
						else{
							for(int i=0;i<orderList.size();i++){
								OrderInfo orderInfo = orderList.get(i);
								
								


								String status = "";
								if(orderInfo.getStatus() == 0){
									status = "已挂号排队中";
								}else if(orderInfo.getStatus() == 1){
									status = "检查缴费";
								}else if(orderInfo.getStatus() == 100){
									status = "治疗完毕";
								}else if (orderInfo.getStatus() == 101){
									status = "已复诊";
								}else if(orderInfo.getStatus() == 99){
									status = "已取消排队";
								}

								out.println("<tr>");
								out.println("<td height='30'><div align='center'><font color='#666666'>"+orderInfo.getOrderId()+"</font></div></td>");
								out.println("<td><div align='center'>"+status+"</div></td>");
								out.println("<td><div align='center'><font color='#666666'>"+orderInfo.getOrderTime()+"</font></div></td>");

								//out.println("<td><div align='center'><a href='servlet/OrderInfo?method=showOrderInfo&orderId="+orderInfo.getOrderId()+"'>查看详情</a></div></td>");
								out.println("<td>");
								out.println("<div align='center'>");
								out.println("<a href='servlet/OrderInfo?method=showOrderInfo&orderId="+orderInfo.getOrderId()+"'>查看详情</a>");
								if(orderInfo.getStatus() == 0){
									out.println("<a href='servlet/DoMethod?method=updateStatus&orderId="+orderInfo.getOrderId()+"'>取消排队</a>");
								}
								out.println("</div>");
								out.println("</td>");
								
								out.println("</tr>");

							}
						}
						out.println("</table>");
						out.println("</td></tr>");


					%>
				</table>

			</div>
			<!--内容-->
		</div>
	</div>
	<!-- 第二部分内容 -->

	<!--底部-->

	<jsp:include page="../web/bottom.jsp" flush="true"/>
</div>
</body>
</html>









